<html>
<head>
	<meta charset="UTF-8">
	<meta content="IE=edge" http-equiv="X-UA-Compatible">
	<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
	<title>2822：[AHOI2012]树屋阶梯</title>
	<!-- css -->
	<link href="../css/base.min.css" rel="stylesheet">
	<link href="../css/project.min.css" rel="stylesheet">
	
	<!-- favicon -->
	<!-- ... -->
</head>
<body class="page-brand">
	<header class="header header-transparent header-waterfall ui-header">
		<ul class="nav nav-list pull-left">
			<li>
				<a data-toggle="menu" href="#menu">
					<span class="icon icon-lg">menu</span>
				</a>
			</li>
		</ul>
		<a class="header-logo header-affix-hide margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[AHOI2012]树屋阶梯</a>
		<span class="header-logo header-affix margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[AHOI2012]树屋阶梯</span>
	</header>
	<nav aria-hidden="true" class="menu" id="menu" tabindex="-1">
		<div class="menu-scroll">
			<div class="menu-content">
				<a class="menu-logo" href="../index.html">BZOJ离线题库</a>
				<ul class="nav">
					<li>
						<a class="waves-attach" data-toggle="collapse" href="#problems">题目</a>
						<ul class="menu-collapse collapse in" id="problems">
							<li>
								<a class="waves-attach" href="../index.html">主页</a>
							</li>
							<li>
								<a class="waves-attach" href="../list.html">题目列表</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="collapsed waves-attach" data-toggle="collapse" href="#about">关于</a>
						<ul class="menu-collapse collapse" id="about">
							<li>
								<a class="waves-attach" href="../about.html">关于此项目</a>
							</li>
						</ul>
					</li>
					
				</ul>
			</div>
		</div>
	</nav>
	<main class="content">
		<div class="content-header ui-content-header">
			<div class="container">
				<h1 class="content-heading">
                [AHOI2012]树屋阶梯                </h1>
                <p>时间限制：1s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  空间限制：128MB</p>			</div>
		</div>
		<div class="container">
			<section class="content-inner margin-top-no">
				<div class="row">
					<div class="col-lg-13 col-md-13">
						<div class="card margin-bottom-no">
							<div class="card-main">
								<div class="card-inner">
									
                                <h3>题目描述</h3><p><div style="margin: 0cm 44.05pt 0pt 17.9pt; line-height: 23.35pt; text-align: left"><span style="font-size: 12pt; color: black">暑假期间，小龙报名了一个模拟野外生存作战训练班来锻炼体魄，训练的第</span><span style="font-size: 12pt; color: black">一个晚上，教官就给他们出了个难题。由于地上露营湿气重，必须选择在高处的</span><span style="font-size: 12pt; color: black">树屋露营。小龙分配的树屋建立在一颗高度为</span><span style="font-size: 12pt; color: black">N+1</span><span style="font-size: 12pt; color: black">尺（</span><span style="font-size: 12pt; color: black">N</span><span style="font-size: 12pt; color: black">为正整数）的大树上，</span><span style="font-size: 12pt; color: black">正当他发愁怎么爬上去的时候，发现旁边堆满了一些空心四方钢材（如图</span><span style="font-size: 12pt; color: black">1.1</span><span style="font-size: 12pt; color: black">），</span><span style="font-size: 12pt; color: black">经过观察和测量，这些钢材截面的宽和高大小不一，但都是</span><span style="font-size: 12pt; color: black">1</span><span style="font-size: 12pt; color: black">尺的整数倍，教官</span><span style="font-size: 12pt; color: black">命令队员们每人选取</span><span style="font-size: 12pt; color: black">N</span><span style="font-size: 12pt; color: black">个空心钢材来搭建一个总高度为</span><span style="font-size: 12pt; color: black">N</span><span style="font-size: 12pt; color: black">尺的阶梯来进入树屋，</span><span style="font-size: 12pt; color: black">该阶梯每一步台阶的高度为</span><span style="font-size: 12pt; color: black">1</span><span style="font-size: 12pt; color: black">尺，宽度也为</span><span style="font-size: 12pt; color: black">1</span><span style="font-size: 12pt; color: black">尺。如果这些钢材有各种尺寸，且</span><span style="font-size: 12pt; color: black">每种尺寸数量充足，那么小龙可以有多少种搭建方法？（注：为了避免夜里踏空，</span><span style="font-size: 12pt; color: black">钢材空心的一面绝对不可以向上。）</span></div>
<div style="margin: 0cm 44.05pt 0pt 17.9pt; line-height: 23.35pt; text-align: left"><span style="font-size: 12pt; color: black"><img height="286" width="668" alt="" src="../file/2822_0.jpg" /></span></div>
<p style="text-align: left"></p>
<p style="text-align: left"><span style="font-size: 12pt; color: black; font-family: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&nbsp;&nbsp; 以树屋高度为</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Courier New&quot;; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">4</span><span style="font-size: 12pt; color: black; font-family: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">尺、阶梯高度</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Courier New&quot;; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">N=3</span><span style="font-size: 12pt; color: black; font-family: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">尺为例，小龙一共有如图</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Courier New&quot;; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">1.2</span><span style="font-size: 12pt; color: black; font-family: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">所示的</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Courier New&quot;; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">5</span><span style="font-size: 12pt; color: black; font-family: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">种</span><span style="font-size: 12pt; color: black; font-family: &quot;Courier New&quot;; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"> </span></p>
<p style="text-align: left"><span style="font-size: 12pt; color: black; font-family: &quot;Courier New&quot;; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&nbsp;&nbsp; </span><span style="font-size: 12pt; color: black; font-family: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">搭 建方法：</span></p>
<p style="text-align: left"><span style="font-size: 12pt; color: black; font-family: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&nbsp;&nbsp; <img height="256" width="752" alt="" src="../file/2822_1.jpg" /></span></p>
<p style="text-align: left"></p></p><hr/><h3>输入格式</h3><p><p><span style="font-size: 12pt; color: black; font-family: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">一个正整数</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Times New Roman&quot;; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><span style="mso-tab-count: 1"> </span>N(1</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Courier New&quot;; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&le;</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Times New Roman&quot;; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">N</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Courier New&quot;; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&le;</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Times New Roman&quot;; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">500)</span><span style="font-size: 12pt; color: black; font-family: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">，表示阶梯的高度</span></p></p><hr/><h3>输出格式</h3><p><p><span style="font-size: 12pt; color: black; font-family: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">一个正整数，表示搭建方法的个数。（注：搭建方法个数可能很大。）</span></p></p><hr/><h3>样例输入</h3><pre>3</pre><hr/><h3>样例输出</h3><pre>5</pre><hr/><h3>提示</h3><p><p><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Times New Roman&quot;; letter-spacing: 0.25pt; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">1</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Courier New&quot;; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><span style="mso-tab-count: 1">&nbsp; </span>&le;</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Times New Roman&quot;; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">N</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Courier New&quot;; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&le;</span><span lang="EN-US" style="font-size: 12pt; color: black; font-family: &quot;Times New Roman&quot;; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">500 </span></p></p><hr/><h3>题目来源</h3><p>没有写明来源</p>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				
			</section>
		</div>
	</main>

	<div class="fbtn-container">
		<div class="fbtn-inner">
			<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light waves-effect" data-toggle="dropdown" aria-expanded="true"><span class="fbtn-text fbtn-text-left">Menu</span><span class="fbtn-ori icon">apps</span><span class="fbtn-sub icon">close</span></a>
			<div class="fbtn-dropup">
				<a class="fbtn fbtn-brand waves-attach waves-circle waves-light waves-effect" href="../list.html" target="_self"><span class="fbtn-text fbtn-text-left">题目列表</span><span class="icon">menu</span></a>
				<a class="fbtn fbtn-green waves-attach waves-circle waves-effect" href="../index.html" target="_self"><span class="fbtn-text fbtn-text-left">返回主页</span><span class="icon">home</span></a>
				<a class="fbtn waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/submitpage.php?id=2822" target="_blank"><span class="fbtn-text fbtn-text-left">提交代码</span><span class="icon">send</span></a>
				<a class="fbtn fbtn-orange waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/wttl/wttl.php?pid=2822" target="_blank"><span class="fbtn-text fbtn-text-left">试题讨论</span><span class="icon">chat</span></a>
				
			</div>
		</div>
	</div>

	<!-- js -->
	<script src="../js/jquery.min.js"></script>
	<script src="../js/base.min.js"></script>
	<script src="../js/project.min.js"></script>
</body>
</html>